package com.onlocation.observers;

import android.content.Context;
import android.net.Uri;
import android.provider.CallLog.Calls;

/**
 * Author: Steve Carrell
 * Date: 5/22/12
 */
public class MissedCallsContentObserver extends AbstractCustomContentObserver {
    public static final String CLASS_NAME = MissedCallsContentObserver.class.getName();
    
    public MissedCallsContentObserver(Context context) {
        super(context);
    }

    @Override
    public String getClassName() {
        return CLASS_NAME;
    }

    @Override
    public Uri getContentUri() {
        return Calls.CONTENT_URI;
    }

    @Override
    public String getSelection() {
        return Calls.TYPE +  " = " + Integer.toString(Calls.MISSED_TYPE) + " and " + Calls.NEW + " = 1";
    }

    @Override
    public String[] getProjection() {
        return new String[] {"_id"};
    }
}
